﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using uz.control.CustomControl;

namespace uz.control.Entity
{
    public class EntityCollection:TNB_Label
    {
        public EntityCollection()
        {
            ToolBar.AddCommand(CMD_ADD_CHILD_STR, "添加实体（F5）");
        }

        public override string Text
        {
            get
            {
                string str = "实体集";
                str +="(" + (Nodes.Count) +")";
                return str;
            }
        }

        public override void Edit()
        {
            
        }

        public override UzTreeNode AddChild()
        {
            Entity node = new Entity();
            Nodes.Add(node);
            node.IsEdit = true;

            if (IsExpanded == false)
            {
                Expand();
            }

            return node;
        }
    }
}
